<template>
  <el-container class="layout-container">
    <el-header>
      <div class="header-content">
        <div class="logo">
          <img src="@/assets/logo.png" alt="Logo">
          <span>算法学习平台</span>
        </div>
       
      </div>
    </el-header>
    
    <el-container>
      <el-aside width="200px">
        <Sidebar />
      </el-aside>
      
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
    
    <el-footer>
      <p>© 2024 算法学习平台. All rights reserved.</p>
    </el-footer>
  </el-container>
</template>

<script>
import { ArrowDown, Operation, Connection, Select } from '@element-plus/icons-vue'
import Sidebar from '@/components/Sidebar.vue'

export default {
  name: 'App',
  components: {
    ArrowDown,
    Operation,
    Connection,
    Select,
    Sidebar
  },
  methods: {
    handleCommand(command) {
      this.$router.push(command)
    }
  }
}
</script>

<style>
.layout-container {
  min-height: 100vh;
}

.el-header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0 20px;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.header-content {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo span {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
}

.el-dropdown-link {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  color: #2c3e50;
}

.el-dropdown-link:hover {
  color: #409EFF;
}

.el-aside {
  background-color: #f5f5f5;
  margin-top: 60px;
  height: calc(100vh - 60px);
  position: fixed;
  left: 0;
}

.el-main {
  margin-left: 200px;
  margin-top: 60px;
  padding: 20px;
  background-color: #f0f2f5;
  min-height: calc(100vh - 60px);
}

.el-footer {
  text-align: center;
  background-color: #fff;
  color: #666;
  padding: 20px;
  margin-left: 200px;
}

:deep(.el-dropdown-menu__item) {
  display: flex;
  align-items: center;
  gap: 8px;
}

:deep(.el-dropdown-menu__item i) {
  margin-right: 5px;
}
</style>
